package com.breaktian.assemble.router.i;



import com.breaktian.assemble.router.parse.Rule;

import java.util.HashMap;
import java.util.List;

/**
 * Created by keke.tian on 2017/7/26.
 * 唯品路由
 */

public interface IRouterTable {



    /**
     * 获取路由表
     *
     * */
    HashMap<String,Rule> getRouterTable();

    /**
     * 导入
     *
     * */
    void importRouterTable(List<Rule> ruleList);

    /**
     * 添加路由规则
     * @param schema
     * @param rule
     * */
    void addRouterRule(String schema, Rule rule);

    /**
     * 修改路由规则
     * @param schema
     * */
    void modRouterRule(String schema, Rule rule);

    /**
     * 删除路由规则
     *
     * */
    void delRouterRule(String schema);

    /**
     * @param schema
     * @return Rule
     * 获取Rule
     *
     * */
    Rule getRule(String schema);

}
